package com.drg.center.service.impl;

import com.drg.center.dao.SysDoctorDAO;
import com.drg.center.entity.SysDoctorPO;
import com.drg.center.entity.result.DoctorVO;
import com.drg.center.service.SysDoctorService;
import com.guaike.core.entity.result.Result;
import com.guaike.core.utils.ListUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: zhangxilin
 * @Date: 2024/12/21
 */
@Slf4j
@Service
public class SysDoctorServiceImpl implements SysDoctorService {

    @Autowired
    private SysDoctorDAO sysDoctorDAO;

    @Override
    public Result<List<DoctorVO>> list(String keyword) {
        List<SysDoctorPO> poList = sysDoctorDAO.findList(keyword);
        List<DoctorVO> list = ListUtil.copyList(poList, DoctorVO.class);
        return Result.success().data(list).build();
    }
}
